package com.xr;

import com.xr.controller.HelloController;
import com.xr.controller.MyController;
import com.xr.test.MyController2;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.ApplicationContext;

@SpringBootApplication//对主启动类进行初始化并启动
public class SpringBoot0102Application {

    public static void main(String[] args) {

        //string容器
        ApplicationContext context = SpringApplication.run(SpringBoot0102Application.class, args);
        HelloController bean = context.getBean(HelloController.class);
        System.out.println(bean);

        MyController bean1 = context.getBean(MyController.class);
        System.out.println(bean1);


//        MyController2 bean2 = context.getBean(MyController2.class);
//        System.out.println(bean2);

    }

}
